home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / tour.dxr / 00001_Start Stop Code.ls next >
Encoding:
Text File  |  2000-01-21  |  3.1 KB  |  106 lines

  1. on startMovie
  2.   global menuAudio, goOn, audioFile, movieFile, goQuick, gTiming, audioPath, gEnvironObj, gSection, gTourWelcome, gTourForwardArrow, gTourBackArrow, gTourVariables
  3.   if objectp(gEnvironObj) then
  4.     firstPath = getAudioFolder(gEnvironObj)
  5.   else
  6.     clearGlobals()
  7.     firstPath = GetStandAoneAudioFolder()
  8.     gSection = getAt(["Navigation", "Searching", "Graphs", "Word"], 2)
  9.   end if
  10.   if the machineType = 256 then
  11.     audioPath = firstPath & "guide\"
  12.   else
  13.     audioPath = firstPath & "guide:"
  14.   end if
  15.   audioFile = []
  16.   movieFile = []
  17.   menuAudio = "none"
  18.   InitMenuButtons()
  19.   goOn = 0
  20.   gTiming = 0
  21.   goQuick = 0
  22.   gTourForwardArrow = new(script("forward arrow"), "arrow rt", "internal", 42, the loc of sprite 42)
  23.   gTourBackArrow = new(script("back arrow class"), "back", "internal", 43, the loc of sprite 43)
  24.   gTourVariables = new(script("Tour Class"))
  25. end
  26.  
  27. on exitTour
  28.   global gTourForwardArrow, gTourBackArrow, gTourVariables, gForgetList
  29.   go(400)
  30.   gTourForwardArrow = 0
  31.   gTourBackArrow = 0
  32.   condemn(gTourVariables)
  33.   gTourVariables = VOID
  34.   append(gForgetList, the activeWindow)
  35. end
  36.  
  37. on getAudioFile frameNum
  38.   global audioFile, menuAudio, gSection
  39.   case gSection of
  40.     "Overview":
  41.       audioFile = [14: "2100", 20: "2400"]
  42.       menuAudio = "2800"
  43.     "Navigation":
  44.       audioFile = [39: "3201", 51: "3202", 63: "3203", 77: "3204", 80: "3300"]
  45.       menuAudio = "3400"
  46.     "Searching":
  47.       audioFile = [94: "4401", 104: "4402", 112: "4403", 122: "4404", 132: "4405", 141: "4406", 152: "4407", 163: "4408", 185: "4409", 198: "4410", 209: "4411", 230: "4412", 243: "4413", 249: "4414"]
  48.       menuAudio = "4500"
  49.     "Graphs":
  50.       audioFile = [268: "5200", 275: "5302", 280: "5303", 285: "5304", 290: "5305", 295: "5306", 300: "5307", 319: "5400", 323: "5500", 327: "5600", 332: "5701", 337: "5702", 339: "5702b", 342: "5703", 344: "5703b", 357: "5705b", 361: "5800"]
  51.       menuAudio = "5900"
  52.     "Word":
  53.       audioFile = []
  54.       menuAudio = "6600"
  55.     "Credits":
  56.       audioFile = []
  57.       menuAudio = "6600"
  58.   end case
  59.   if count(audioFile) > 0 then
  60.     whichFile = getaProp(audioFile, frameNum)
  61.   end if
  62.   return whichFile
  63. end
  64.  
  65. on getMovieFile frameNum
  66.   global movieFile, menuAudio, gSection
  67.   if gSection = "Overview" then
  68.     menuAudio = "2800"
  69.   else
  70.     if gSection = "Navigation" then
  71.       menuAudio = "3400"
  72.     else
  73.       if marker(0) = label("3.3") then
  74.         menuAudio = "3400"
  75.       else
  76.         if gSection = "Searching" then
  77.           menuAudio = "4500"
  78.         else
  79.           if gSection = "Graphs" then
  80.             menuAudio = "5900"
  81.           else
  82.             if gSection = "Word" then
  83.               menuAudio = "6600"
  84.             end if
  85.           end if
  86.         end if
  87.       end if
  88.     end if
  89.   end if
  90. end
  91.  
  92. on setHandCursor TempCursorList
  93.   repeat with loopVar = 1 to 48
  94.     if getOne(TempCursorList, loopVar) <> 0 then
  95.       set the cursor of sprite loopVar to [member("hand"), member("hand mask")]
  96.       next repeat
  97.     end if
  98.     set the cursor of sprite loopVar to 0
  99.   end repeat
  100. end
  101.  
  102. on GetStandAoneAudioFolder
  103.   pathDelimiter = getPathDelimiter()
  104.   return getParentFolder(the pathName) & "Media" & pathDelimiter & "Audio" & pathDelimiter
  105. end
  106.